package com.dm.sample.mapper;

import com.dm.sample.entity.pojodo.PaymentChannelEntity;
import org.apache.ibatis.annotations.Insert;

/**
 * @author zy
 * @Description:
 */
public interface PaymentMapper {
	/**
	 * 新增数据
	 */
	@Insert("INSERT INTO `meite_pay`.`payment_channel` (`CHANNEL_NAME`, `CHANNEL_ID`, `MERCHANT_ID`, `SYNC_URL`, `ASYN_URL`, `PUBLIC_KEY`, `PRIVATE_KEY`, `compensation_bean_id`, `class_ADDRES`, `CHANNEL_STATE`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('阿里支付', 'ali_pay', '777290058168076', 'http://localhost:8080/ACPSample_B2C/frontRcvResponse', 'http://222.222.222.222:8080/ACPSample_B2C/backRcvResponse', NULL, NULL, NULL, 'com.zy.pay.strategy.impl.AliPay', '0', NULL, NULL, NULL, NULL, NULL);")
	int insertPaymentChannel();

	/**
	 * 更新数据
	 */
	@Insert("update  `meite_pay`.`payment_channel` set CHANNEL_NAME=#{channelName},CHANNEL_ID=#{channelId}, REVISION=#{revision}  where ID = #{id} and channel_state=#{channelState}")
	int updatePaymentChannel(PaymentChannelEntity paymentChannelEntity);
}
